I see one possible issue. The Y homing code sets the destination to:
EnableAxisDest(1,-95611.2);
Which is exactly the range of the Soft Limits
ch1->SoftLimitPos=95611.2;
ch1->SoftLimitNeg=-95611.2;
This may trigger a Soft Limit error.
Actually it is not really possible to use Soft Limits until after the machine has been homed. So you may want to leave them disabled (infinity) and then set them to normal values at the end of the Home Program.
Your initialization code currently sets the current
destination to zero. You might want to have it leave the current destination unchanged by changing:
EnableAxisDest(0,0);
to
EnableAxisDest(0,ch0->Dest);
I assume this code is for diagnostics:
if (ReadBit(180) == 0)
{
printf("Bit State Pressed");
}
But if Bit 180 becomes true it will print a huge number of message to the Console.
I don't understand or see an explanation for the other issues.
Regards
TK
Group: DynoMotion |
Message: 8571 |
From: Tom Kerekes |
Date: 11/4/2013 |
Subject: Re: Reg: Homing - Y-Axis doesnt "Home" properly, stops inbetween |
Hi,
As I mentioned the code you sent with the loop could send infinite messages to the KMotion Console which would likely clog the USB bandwidth and make KMotionCNC unresponsive. You might change the code to only display one message (use a flag). Or put a delay (1sec) after printing to limit the number of messages.
Regards TK
| |